package gerenciaDados.cln.cgt.PI.descricaoeRepresentacao;

public class Ponto {
	private double x;
	private double y;
	
	public Ponto(double x,double y){
		this.x = x;
		this.y = y;
	}
	
	public static Ponto xaspy(Ponto a, Ponto b, double k){
		return new Ponto( a.x + k*b.x, a.y + k*b.y);
	}
	
	public void acumula(Ponto p, double k){
		this.x += p.getX()*k;
		this.y += p.getY()*k;
	}
	
	public double getX(){
		return this.x;
	}
	
	public double getY(){
		return this.y;
	}
	
	public void setX(double x){
		this.x = x;
	}
	
	public void setY(double y){
		this.y = y;
	}
	
	public void to_s(){
		System.out.println("("+this.x+","+this.y+")");
	}
}
